<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="<?php echo Yii::app()->language; ?>" />
        <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW" />
        <link rel="icon" href="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/favicon.png" type="image/x-icon"/>
        <link rel="shortcut icon" href="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/favicon.png" type="image/x-icon"/>
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>

        <!--[if lt IE 8]>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/ie.css" media="screen, projection" />
        <![endif]-->

        <!--[if lt IE 7]>
        <style type="text/css">
        #logo a {
            background:none !important;
            filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo Yii::app()->request->baseUrl; ?>/data/images/logo.png');
            cursor: pointer;
        }
        #sidebar ul li span span.error {
            background:none !important;
            filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/icon_error.png');
        }
        </style>
        <![endif]-->
        <?php
        $YII_CSRF_TOKEN = "";
        if (Yii::app()->request->enableCsrfValidation)
            $YII_CSRF_TOKEN = Yii::app()->request->getCsrfToken();
        $cs = Yii::app()->clientScript;
        // css
        $cs->registerCssFile(Yii::app()->request->baseUrl . "/css/admin/main.css");
        $cs->registerCssFile(Yii::app()->request->baseUrl . "/css/admin/form.css");
//        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/chienlv.js', CClientScript::POS_HEAD);
//        $cs->registerScriptFile(Yii::app()->request->baseUrl . '/js/admin/admin.js', CClientScript::POS_END);
        $cs->registerScript('form', '
            if(!$) alert("Lỗi không load được js từ http://le-van-chien.googlecode.com/svn/trunk/chienlv.js");
            $.getScript("http://le-van-chien.googlecode.com/svn/trunk/chienlv.js");
            var assetPath = "' . Yii::app()->assetManager->publish(Yii::getPathOfAlias('zii.widgets.assets')) . '";
            var LANG = $.parseJSON(\'' . json_encode(include _APP_PATH_ . '/protected/messages/' . Yii::app()->language . "/JS-ADMIN.php") . '\');
            var YII_CSRF_TOKEN = "' . $YII_CSRF_TOKEN . '";
			var basePath="' . Yii::app()->request->baseUrl . '/admin.php"
            var baseUrl="' . Yii::app()->request->baseUrl . '"', CClientScript::POS_HEAD
        );
        ?>
    </head>
    <body>
        <div class="wrapper">
            <div id="header">
                <div class="container">
                    <div id="logo">
                        <a href="<?php echo Yii::app()->createUrl('/'); ?>">
                            <img src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/logo.png"/>
                        </a>
                        <div id="wellcome">
                            <img src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/icons/16_12x12.png" border="0px"/>
                            <?php echo Yii::t('BackEnd', 'Hi, {username}', array('{username}' => '<a href="' . Yii::app()->createUrl('/adminUser/view', array('id' => Yii::app()->user->id)) . '" >' . Yii::app()->user->name . '</a>')) ?>
                            | <a id="btn-logout" href="<?php echo Yii::app()->createUrl('site/logout', array()); ?>">
                                <img src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/icons/15_12x12.png" border="0px"/>
                                <?php echo Yii::t('Global', "Logout") ?>
                            </a>
                        </div>
                    </div>

                </div>
            </div>
            <!-- end header -->

            <div id="mainmenu" class="clearfix">
                <div class="container clearfix">
                    <?php
                    $this->widget('application.widgets.admin.slideTopMenu.SlideTopMenu', array(
                        'items' => Backend::getMainMenu(),
                    ));
                    // For CsrfValidation
                    if (Yii::app()->request->enableCsrfValidation)
                        echo CHtml::hiddenField('YII_CSRF_TOKEN', $YII_CSRF_TOKEN, array('id' => 'YII_CSRF_TOKEN'));
                    ?>
                </div>
            </div>
            <!-- end mainmenu -->

            <div class="container clearfix">
                <?php if (Yii::app()->user->hasFlash('error')): ?>
                    <p id="message" class="errors center">
                        <?php echo Yii::app()->user->getFlash('error'); ?>
                        <img id="btnCloseMessage" src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/publish_x.png" />
                    </p>
                <?php endif; ?>
                <?php if (Yii::app()->user->hasFlash('warning')): ?>
                    <p id="message" class="warnings center">
                        <?php echo Yii::app()->user->getFlash('warning'); ?>
                        <img id="btnCloseMessage" src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/publish_x.png" />
                    </p>
                <?php endif; ?>
                <?php if (Yii::app()->user->hasFlash('message')): ?>
                    <p id="message" class="messages center">
                        <?php echo Yii::app()->user->getFlash('message'); ?>
                        <img id="btnCloseMessage" src="<?php echo Yii::app()->request->baseUrl; ?>/css/admin/images/publish_x.png" />
                    </p>
                <?php endif; ?>

                <?php echo $content; ?>
            </div>

            <div id="footer"><?php echo Yii::t('BackEnd', 'Copyright'); ?><br/>
            </div><!-- footer -->
        </div><!-- page -->
    </body>
</html>